<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title>购物车</title>
    <link rel="stylesheet" href="/css/cart.css">
    <link rel="stylesheet" href="/css/header.css">
    <link rel="stylesheet" href="/css/footer.css">
  </head>
  <body>
    <header></header>
    <div id="cart_container">
      <!-- <div id="lunbo">轮播图</div> -->
        <div id="cart_products">
          <div id="theader">
            <input type="checkbox" checked="checked" id="chk_all">
            <ul>
              <li>购物车商品</li>
            </ul>
          </div>
          <div id="tbody">

          </div>

        </div>
        <div id="cart_sum">
          <div id="sum_container">
            <ul>
              <li style="border-bottom:'none'">
                原价
                <span id="old_price"></span>
              </li>
              <li>总额 <span  id="sum_price"></span></li>
            </ul>
            <button type="button" name="button" id="settlement">结算订单</button>
          </div>
        </div>
    </div>
    <footer></footer>

    <script type="text/html" id="cart-template">
      {{each cart prod}}
      <dl>
        <dt>
          <input type="checkbox" checked="checked" class="chk_prod">
        </dt>
        <dd class="cart_images">
          <img src="{{prod.img}}" alt=""/>
        </dd>
        <dd class="cart_main">
          <p class="cart_title">{{prod.title}}</p>
          <p class="cart_id">{{prod.id}}</p>
          <p class="cart_price">单价：￥<span>{{prod.price}}</span></p>
          <div class="add_btn">
            <a href="javascript:void(0);" class="addcart_product">+</a>
            <span class="amount">{{prod.amount}}</span>
            <a href="javascript:void(0);" class="reducecart_product">-</a>
          </div>
          <p class="sum_price">合计：￥
            <span>{{(prod.amount*prod.price).toFixed(2)}}</span>
          </p>
        </dd>
        <dd>
          <a href="javascript:void(0);" class="delete_cart"></a>
        </dd>
      </dl>
      {{/each}}
    </script>

    <script src="/libs/requirejs/require.js" data-main="/js/cart"></script>

  </body>
</html>
